package net.huashitong.supervision.task.dao;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;
import net.huashitong.supervision.task.entity.EvalRules;
import net.huashitong.supervision.task.filter.EvalRulesFilter;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class EvalRuleDao  extends StringDao<EvalRules> {


    public List<EvalRules> queryEvalRules(EvalRulesFilter filter ){

        GenericQuery query = createQuery("obj");
        query.append("and obj.ruleId=:ruleId").setParam("ruleId",filter.getRuleId());

        return query.listResult();
    }

}
